package com.iter.devbox.pattern.observer;

public class Client {

	public static void main(String[] args) {
		//创建主题对象
        Subject subject = new Subject();
        //创建观察者对象
        Observer observer = new Observer();
        //将观察者对象登记到主题对象上
        subject.attach(observer);
        //改变主题对象的状态
        subject.change("new state");
	}
}
